<%-- 
    Document   : DanhSachGianHangView
    Created on : 13-02-2011, 21:21:03
    Author     : Mr Long
--%>
<%@page import="POJO.Khuvuc"%>
<%@page import="POJO.Sanpham"%>
<%@page import="POJO.Gianhang"%>
<%@page import="java.util.List"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html> 
    <div class="mnutitle"><span>Quản Lí Sản Phẩm Bày Bán</span></div>
    <div class="chucnangsp"><a href="tiepnhangianhang.html">Thêm mới</a></div>
    <!--body content-->
    <div class="boxbody">           
        <div class="danhsachsanpham">
            <div class="sprows">
                <div class="sprowhd">
                    <div class="clrowstt"><span>STT</span></div>
                    <div class="clrowtsp"><span>Tên Sản Phẩm</span></div>
                    <div class="clrowlsp"><span>Khu Vực</span></div>
                    <div class="clrowgg"><span>Giá gốc</span></div>
                    <div class="clrowgg"><span>Khuyến mãi</span></div>
                    <div class="clrowgg"><span>Giá bán</span></div>
                    <div class="clrowcn"><span>Chức Năng</span></div>
                </div>
            </div>
            <!--Duyet danh sach san pham-->
            <%
                List<Gianhang> dsgh = (List<Gianhang>) request.getAttribute("lstGH");
                if (dsgh != null) {
                    List<Sanpham> dssp = (List<Sanpham>) request.getAttribute("lstSP");
                    List<Khuvuc> dskv = (List<Khuvuc>) request.getAttribute("lstKV");
                    for (int i = 0; i < dsgh.size(); i++) {
            %>

            <!--bat dau fill thong tin san pham--> 
            <div class="sprows">
                <div class="sprow">
                    <div class="clrowstt"><%=i%></div>
                    <div class="clrowtsp"><%=dssp.get(i).getTenSanPham()%></div>
                    <div class="clrowlsp"><%=dskv.get(i).getTenKhuVuc()%></div>
                    <div class="clrowgg"><%=dsgh.get(i).getGiaGoc()%></div>
                    <div class="clrowgg"><%=dsgh.get(i).getKhuyenMai()%></div>
                    <div class="clrowgg"><%=dsgh.get(i).getGiaBan()%></div>
                    <div class="clrowcn">
                        <div class="cnbutton"><a href="capnhatgianhang.html?MaGH=<%=dsgh.get(i).getMaGianHang()%>">Sửa</a></div>
                        <div class="cnbutton"><a href="xoagianhang.html?MaGH=<%=dsgh.get(i).getMaGianHang()%>">Xóa</a></div>
                    </div>
                </div>   
            </div>
            <%}
                }%> 
        </div>
    </div>
</html>
